package com.framework.common.response;


import com.framework.common.pojo.PaginationResult;

import java.io.Serializable;

/**
 * @author zhoubb
 * @version V1.0
 * @Date 2020/1/25 14:06
 * @since JDK 1.8
 */
public class BaseQueryResponse<T> extends ResponseBaseBean implements Serializable {

    private static final long serialVersionUID = -2513174401527750718L;

    private PaginationResult<T> data;

    public PaginationResult<T> getData() {
        return data;
    }

    public void setData(PaginationResult<T> data) {
        this.data = data;
    }

    public BaseQueryResponse() {
    }

    public BaseQueryResponse(PaginationResult<T> data) {
        this.data = data;
    }

    public static <T> BaseQueryResponse<T> newBaseQueryResponse() {
        return new BaseQueryResponse<T>();
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("BaseQueryResponse{");
        sb.append("paginationResult=").append(data);
        sb.append('}');
        return super.toString() + "-" + sb.toString();
    }
}
